package com.example.mamsinject

import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.example.mamsinject.ui.MyAdapter


class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)


//        val banner = findViewById<Banner<*, *>>(R.id.banner)
////        banner.setAdapter(object : BannerImageAdapter<String?>(Data.banners) {
////            fun onBindView(holder: BannerImageHolder, data: String, position: Int, size: Int) {
////                Glide.with(holder.itemView)
////                    .load(data)
////                    .into(holder.imageView)
////            }
////        }).addBannerLifecycleObserver(this)
////            .setIndicator(RectangleIndicator(this))
//
//        banner.setAdapter(object : BannerImageAdapter<String>(Data.banners){
//            override fun onBindView(
//                holder: BannerImageHolder?,
//                data: String?,
//                position: Int,
//                size: Int
//            ) {
//                TODO("Not yet implemented")
//            }
//
//        }).addBannerLifecycleObserver(this)
//            .setIndicator(RectangleIndicator(this))

        val recyclerView = findViewById<RecyclerView>(R.id.recyclerView)
        val layoutManager = LinearLayoutManager(this)
        recyclerView.layoutManager = layoutManager
        val adapter = MyAdapter(this)
        recyclerView.adapter = adapter
    }


    fun click(view: View?) {
        EnjoyTest.a()
    }

    fun jump(view: View) {

        startActivity(Intent(this, MainActivity2::class.java))
    }
}